package pers.wangyuhang.demo1;

/**
 * Created with IntelliJ IDEA.
 * Desciption:
 * User: 15716
 * Date: 2021-12-22
 * Time: 20:00
 */
public class Student extends Person{
    //String name;
    //int age;
    String major;//代表学生所在的专业

    public Student() {

    }

    public Student(String name,int age,String major) {
        this.name = name;
        this.age = age;
        this.major = major;
    }

    public void sleep() {
        System.out.println("睡觉");
    }

    public void eat() {
        System.out.println("吃饭");
    }

}
